import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [{
    path: '/login',
    name: '登录页',
    component: () =>
      import('@/pages/login')
  },
  {
    path: '*',
    name: '404',
    component: () =>
      import('@/pages/exception/404'),
  },
  {
    path: '/403',
    name: '403',
    component: () =>
      import('@/pages/exception/403'),
  },
  {
    path: '/',
    name: '首页',
    component: TabsView,
    redirect: '/login',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      meta: {
        icon: 'dashboard'
      },
      component: () =>
        import('@/views/dashboard/index'),
    },

    // {
    //   path: 'profile',
    //   name: '个人中心',
    //   meta: {
    //     icon: 'profile'
    //   },
    //   component: () =>
    //     import('@/views/profile/index'),
    // },

    {
      path: 'password',
      name: '修改密码',
      component: () =>
        import('@/views/password/reset'),
    },

    {
      path: 'orders',
      name: '订单管理',
      meta: {
        icon: 'shopping'
      },
      component: PageView,
      children: [{
        path: 'buy',
        name: '买入订单',
        component: () =>
          import('@/views/buy')
      },
        // {
        //   path: 'sell',
        //   name: '卖出订单',
        //   component: () =>
        //     import('@/views/sell')
        // },
      ]
    },
    // {
    //   path: 'balance',
    //   name: '财务管理',
    //   meta: {
    //     icon: 'account-book'
    //   },
    //   component: PageView,
    //   children: [{
    //     path: 'details',
    //     name: '账变明细',
    //     component: () =>
    //       import('@/views/balance/index')
    //   },
    //   {
    //     path: 'report',
    //     name: '数据报表',
    //     component: () =>
    //       import('@/views/balance/index')
    //   },
    //   ]
    // },

    {
      path: 'members',
      name: '下级用户',
      meta: {
        icon: 'team'
      },
      component: PageView,
      children: [
        {
          path: 'index',
          name: '用户列表',
          component: () =>
            import('@/views/member/index')
        },
        {
          path: 'add',
          name: '新增用户',
          component: () =>
            import('@/views/member/add')
        }
      ]

    },


    ]
  },
  ]
}

export default options